// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
const vscode = require("vscode");
// const itemval = require("./item/index.js");
const userval = require("./user/index.js");
const webVal = require("./web/index.js");
const editVal = require("./editor/index.js");
const fileVal = require("./file/index.js");
const optVal = require("./operater/index.js");




const user = new userval.User();
// const item = new itemval.daodanItem();
const web = new webVal.web();
const edit=new editVal.editor()
const files=new fileVal.files()
const opt = new optVal.operater()
// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed

/**
 * @param {vscode.ExtensionContext} context
 */
function activate(context) {
  // Use the console to output diagnostic information (console.log) and errors (console.error)
  // This line of code will only be executed once when your extension is activated
  console.log('Congratulations, your extension "daodan" is now active!');

  let disposable = vscode.commands.registerCommand(
    "daodan.nihao",
    function (val) {
      if (val) {
        console.log(val);
      }
      vscode.window.showInformationMessage("你好!");
    }
  );
  context.subscriptions.push(disposable);

  user.setctx(context);

  //web
  web.setctx(context);
  edit.setCtx(context)
  files.setCtx(context)
  opt.setCtx(context)
}

// This method is called when your extension is deactivated
function deactivate() {}

module.exports = {
  activate,
  deactivate,
};
